package cn.shujuhai.meeting.service;

import cn.shujuhai.common.pluging.data.ResultVo;
import cn.shujuhai.meeting.domain.FrequencyVo;
import cn.shujuhai.meeting.domain.Reservation;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;

import java.util.List;
import java.util.Set;

/**
 * @author 4g0
 * @description 针对表【 reservation】的数据库操作Service
 * @createDate 2025-06-16 15:09:22
 */
public interface ReservationService extends IService<Reservation> {

    ResultVo<?> add(List<Reservation> reservation, Long roomId);

    ResultVo<Set<FrequencyVo>> check(FrequencyVo frequencyVo, Long roomId);

    ResultVo<?> getMeetByDepartment(Long departmentId);

    ResultVo<Set<FrequencyVo>> removeReservation(FrequencyVo frequencyVo);

    ResultVo<?> clear();

    ResultVo<?> reservationListByUserIdAndRoomId(Long roomId);

    ResultVo<?> getMeetByUserId();


    ResultVo<PageInfo<Reservation>> getList(Reservation reservation, @NotNull(message = "当前页码不能为空") @Min(value = 1, message = "当前页码必须大于等于1") @Max(value = Integer.MAX_VALUE, message = "当前页码不能超过整型范围") Integer pageNum, @NotNull(message = "每页显示条数不能为空") @Min(value = 1, message = "每页显示条数必须大于等于1") @Max(value = Integer.MAX_VALUE, message = "每页显示条数不能超过整型范围") Integer pageSize);

    ResultVo<?> removeByReservationId(Long reservationId);

    ResultVo<?> removeBatchReservation(List<Long> reservationIds);

    ResultVo<?> edit(Long reservationId, String purpose, Long userId);

    void exportReservation(HttpServletResponse response);
}
